
#*--encoding:UTF-8--*

'''
整理数据
'''

from common.helper import Helper
from db.mysql import MysqlClient

class Arrangement( object ):

    def __init__(self):

        self.mysql = MysqlClient()
        self.name = "都健康  全民百万医疗"
    # 拉取数据
    def pullData(self, data={}):
        for item in Helper.selectData(self.name, self.mysql):
            data["name"] = self.name
            data["company"] = "都邦保险"
            data["year"] = item["year"]
            data["socialSec"] = "Y" if item["socialSec"] == "true" else "N"
            data["expire"] = "1年"
            data["generalMedical"] = "200w"
            data["seriousMedical"] = "200w"
            data["extSerious"] = "1"
            data["price"] = item["price"]
            Helper.mergeTable(self.name, self.mysql, data)